
<!DOCTYPE html>
<html class="client-nojs" lang="en" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>Cpclean - PanoTools.org Wiki</title>




<style media="screen" type="text/css" title="Screen style sheet"> @import url(manual.css); </style>

<meta name="generator" content="MediaWiki 1.35.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>





<!--[if lt IE 9]><![endif]-->
</head>
<body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Cpclean rootpage-Cpclean skin-vector action-view skin-vector-legacy">


<div id="content" class="mw-body" role="main">
	<a id="top"></a>
	
	
	<h1 id="firstHeading" class="firstHeading" lang="en">Cpclean</h1>
	<div id="bodyContent" class="mw-body-content">
		<div id="siteSub" class="noprint">From PanoTools.org Wiki</div>
		
		
		
		
		
		
		<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><p><b>cpclean</b> is a command-line tool that implements the 'bad' <a href="Control_points.html" title="Control points">control points</a> pruning available within the <a href="Hugin.html" title="Hugin">Hugin</a> GUI. It is similar conceptually to apclean<a class="external" href="https://wiki.panotools.org/index.php?title=Apclean&amp;action=edit&amp;redlink=1">[*]</a>, but with some extra functionality. Both tools use a statistical filter to remove points with an error above a statistical threshold.
</p><p>The idea is to remove all non-credible control points.  To do this it uses a two step process to remove bad control points. 
</p>
<div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" />
<ul>





</ul>
</div>

<h3><a name="Step_1"><span class="mw-headline">Step 1</span></a></h3>
<p>optimises all image pairs, calculates for each pair mean and standard deviation sigma and then deletes all control points with an error bigger then mean+n*sigma.
</p>
<h3><a name="Step_2"><span class="mw-headline">Step 2</span></a></h3>
<p>optimises the whole project together using more conservative assumptions, calculates then mean and standard deviation sigma and then deletes another round of control points with error bigger then mean+n*sigma. If there is more than one image chain present this step is not done.
</p>
<h3><a name="result"><span class="mw-headline">result</span></a></h3>
<p>The .pto project file is returned unoptimised, the only change is that there are less control points, this means the project doesn't have to be optimised before you start. 
The results of the internal optimisations are only used for the calculation of the mean and cp error and for the cp error checking. At the end the optimisation results are disregarded.
</p><p>By using this optimisation step <b>cpclean</b> is able to look not just at the current project settings and find 'bad' points, but is able to find points that are 'bad' under a range of circumstances.
</p>
<h3><a name="usage"><span class="mw-headline">usage</span></a></h3>
<p>A typical usage would be:
</p>
<pre> cpclean --output=output.pto project.pto
</pre>
<h3><a name="Options"><span class="mw-headline">Options</span></a></h3>
<p>Vary the threshold with the <tt>--max-distance</tt> parameter (defaults to 2, i.e. points with a distance error greater than mean + 2 * sigma are deleted). E.g. when decreasing this factor to 1, then cp with error bigger than mean+1*sigma will be removed, therefore removing more control points:
</p>
<pre> cpclean --max-distance=1 --output=output.pto project.pto
</pre>
<p>Do only image pair cp checking (skip step 2):
</p>
<pre> cpclean --pairwise-checking --output=output.pto project.pto
</pre>
<p>Do only whole panorama cp checking (skip step 1):
</p>
<pre> cpclean --whole-pano-checking --output=output.pto project.pto
</pre>
<p>Do only whole panorama cp checking and use current image positions for calculation of distance errors (skip optimisation of whole panorama):
</p>
<pre> cpclean --whole-pano-checking --dont-optimize --output=output.pto project.pto
</pre>
<p>By default line control point are ignored by the calculations for step 2. With <tt>--check-line-cp</tt> you can also include these control points into calculation
</p>
<pre> cpclean --whole-pano-checking --check-line-cp --output=output.pto project.pto
</pre>
<p>The progress of the whole panorama optimisation can be shown with the <tt>--verbose</tt> option
</p>
<pre> cpclean --verbose --output=output.pto project.pto
</pre>
<p><b>cpclean</b> is based on ptoclean<a class="external" href="https://wiki.panotools.org/index.php?title=Ptoclean&amp;action=edit&amp;redlink=1">[*]</a>.
</p>

<!--
Transclusion expansion time report (%,ms,calls,template)
100.00%    0.000      1 -total
-->


</div></div><div class="printfooter">Retrieved from "<a dir="ltr" href="https://wiki.panotools.org/index.php?title=Cpclean&amp;oldid=17278">https://wiki.panotools.org/index.php?title=Cpclean&amp;oldid=17278</a>"</div>
		</div></div></body></html>